package com.ioudi.digu.ds;

import com.ioudi.digu.dsdistribute.IDatasourceSelector;

public class DistributeDatasourceSelector implements IDatasourceSelector
{
	private static final ThreadLocal<String> contextHolder = new ThreadLocal<String>();
	
	public boolean selectDatasouce(String datasource)
	{
		contextHolder.set(datasource);
		return true;
	}
	
	public String currentDatasouce()
	{
		 return (String) contextHolder.get();
	}
}
